Hard disks are commonly used to store content (e.g., data, applications, executables, libraries, etc.) used by computer systems. Usually, the only way to access content stored on a hard disk is by specifying its physical location (in terms of cylinder, head, and sector). File systems were invented to more easily track content stored on hard disks. A file system, as its name implies, treats different sets of content as files. Each file is separate from others. Over and above content stored within it, each file includes or is associated with additional data including the file's name, the file's access permissions, the date and time of the file's creation, access, modification, etc.
While file systems in the past have included no more complexity than that already mentioned, present-day file systems include mechanisms that make it easier to group files together. The most commonly used mechanism to group files is the directory. Often implemented as a special type of file, directories make it possible to make hierarchical structures of files and directories. While most files have these attributes in common, they vary in implementation details, meaning that not all file systems can be accessed by all operating systems. Some operating systems (e.g., Linux-based operating systems) include support for many popular files systems, making it possible to easily access the file systems of other operating systems.
File systems can be accessed, modified, etc., using file system instructions. For example, the “create” file system instruction allows a new file to be made within a file system. The create instruction is useful, for example, when a new file is saved. The create instruction can change directory entries as well as set up memory space for a new file in the file system. A “delete” file system instruction removes a file from a file system. The space used by the deleted file will be returned to the free space available to the file system. In a file system where the filename is stored along with the file, the “rename” file system instruction will change this. The “open” file system instruction opens a file in preparation for reading the contents of the file, writing new content to the file, appending to the file, etc. The “close” file system instruction closes a file after some action (e.g., for reading the contents of the file, writing new content to the file, appending to the file, etc) has occurred. The “read” file system instruction reads content from a file into buffers within a process. A “write” file system instruction will cause new content to be written to a file. Access to a file will be controlled by permissions attached or associated with the file. Additional file system instructions are contemplated.
Content within a file may have a relationship or dependency with content in one or more other files in the same file system or other file systems. Additionally, content within a file may have a relationship with an entity (e.g., an application, a user, etc.) not contained in a file. Examples of dependencies or relationships include: a “needed-by” relationship between an entity such as an executable or library and a configuration file; a “used-by” relationship between contents of files or between the content of a file and an entity such as an application; a “refers-to” relationship between content in files or between content in a file and another entity; a “group-by” relationship between files or between a file and another entity.
Many of these file relationships should be preserved to insure proper operation of computer systems. Unfortunately, the relationships between files or between a file and another entity can be unwittingly lost when file system instructions are implemented. To illustrate, consider an HTML file (i.e., a web page) that contains a link to content within a second file, thus creating a “refers-to” relationship between the HTML file and the second file. If a file system instruction, when implemented, renames the second file, the link within the HTML file will become invalid, and the relationship between the files will be lost. In another example, suppose content in file F1 is “needed-by” content of another file F2 such that F1 should not be deleted before F2. If a file system instruction, when implemented, deletes F1 before F2, the needed-by relationship between F1 and F2 will be lost. Accordingly, a method or apparatus is needed which functions to maintain or preserve relationships between files or between files and other entities (e.g., applications, users, etc.) that can otherwise be lost when a file system instruction is implemented.